import { Mock } from '../base'

Mock.mock(/\/sysApplication\/queryApplication$/, {
  code: 100000,
  message: 'success',
  result: {
    'list|10': [
      {
        id: '@id',
        appName: '@name',
        appCode: '@string',
        type: '@string',
        category: '@string',
        logo: '@img',
        version: '@string',
        'status|1': [0, 1],
        developId: '@number',
        description: '@string',
        createBy: '@string',
        gmtCreate: '@string',
        updateBy: '@string',
        gmtModified: '@string',
        recordStatus: '@number',
      }
    ],
    total: 100,
  }
})
Mock.mock(/\/sysApplication\/queryApplicationById/, {
  code: 100000,
  message: 'success',
  result: {
    id: '@id',
    appName: '@name',
    appCode: '@string',
    type: '@string',
    category: '@string',
    logo: '@img',
    version: '@string',
    'status|1': [0, 1],
    developId: '@number',
    description: '@string',
    webServerRedirectUri: '@url',
  }
})
Mock.mock(/\/sysApplication\/createApplication$/, {
  code: 100000,
  message: 'success',
  result: '@id',
})
Mock.mock(/\/sysApplication\/modifyApplication$/, {
  code: 100000,
  message: 'success',
})
Mock.mock(/\/sysApplication\/deleteApplication$/, {
  code: 100000,
  message: 'success',
})
Mock.mock(/\/sysApplication\/changeStatusApplication$/, {
  code: 100000,
  message: 'success',
})
Mock.mock(/\/sysApplicationCategory\/selectSysApplicationCategoryList$/, {
  code: 100000,
  message: 'success',
  'result|5': [
    {
      id: '@id',
      gmtCreate: '@string',
      gmtModified: '@string',
      recordStatus: '@number',
      parentId: '@number',
      categoryName: '@string',
      categoryCode: '@string',
      level: '@string',
      sort: '@number',
      'children|5': [
        {
          id: '@id',
          gmtCreate: '@string',
          gmtModified: '@string',
          recordStatus: '@number',
          parentId: '@number',
          categoryName: '@string',
          categoryCode: '@string',
          level: '@string',
          sort: '@number',
          'children|5': [
            {
              id: '@id',
              gmtCreate: '@string',
              gmtModified: '@string',
              recordStatus: '@number',
              parentId: '@number',
              categoryName: '@string',
              categoryCode: '@string',
              level: '@string',
              sort: '@number',
            }
          ],
        }
      ],
    }
  ],
})

Mock.mock(/\/sysPermission\/queryApplicationPermission$/, {
  code: 100000,
  message: 'success',
  'result|5': [
    {
      id: '@id',
      key: '@string',
      title: '@string',
      parentId: '@string',
      name: '@string',
      perms: '@string',
      permsType: '@string',
      icon: '@string',
      component: '@string',
      url: '@string',
      redirect: '@string',
      'sortNo|0-100': 1,
      menuType: 0,
      'isLeaf|1': [0, 1],
      'route|1': [0, 1],
      'keepAlive|1': [0, 1],
      description: '@string',
      recordStatus: '@string',
      createBy: '@string',
      gmtCreate: '@string',
      updateBy: '@string',
      gmtModified: '@string',
      'alwaysShow|1': [0, 1],
      'hidden|1': [0, 1],
      status: '@string',
      'internalOrExternal|1': [0, 1],
      appId: '@string',
      appCode: '@string',
      'children|5': [
        {
          id: '@id',
          key: '@string',
          title: '@string',
          parentId: '@string',
          name: '@string',
          perms: '@string',
          permsType: '@string',
          icon: '@string',
          component: '@string',
          url: '@string',
          redirect: '@string',
          'sortNo|0-100': 1,
          menuType: 1,
          'isLeaf|1': [0, 1],
          'route|1': [0, 1],
          'keepAlive|1': [0, 1],
          description: '@string',
          recordStatus: '@string',
          createBy: '@string',
          gmtCreate: '@string',
          updateBy: '@string',
          gmtModified: '@string',
          'alwaysShow|1': [0, 1],
          'hidden|1': [0, 1],
          status: '@string',
          'internalOrExternal|1': [0, 1],
          appId: '@string',
          appCode: '@string',
          'children|5': [
            {
              id: '@id',
              key: '@string',
              title: '@string',
              parentId: '@string',
              name: '@string',
              perms: '@string',
              permsType: '@string',
              icon: '@string',
              component: '@string',
              url: '@string',
              redirect: '@string',
              'sortNo|0-100': 1,
              menuType: 2,
              'isLeaf|1': [0, 1],
              'route|1': [0, 1],
              'keepAlive|1': [0, 1],
              description: '@string',
              recordStatus: '@string',
              createBy: '@string',
              gmtCreate: '@string',
              updateBy: '@string',
              gmtModified: '@string',
              'alwaysShow|1': [0, 1],
              'hidden|1': [0, 1],
              status: '@string',
              'internalOrExternal|1': [0, 1],
              appId: '@string',
              appCode: '@string',
            }
          ],
        }
      ],
    }
  ],
})

Mock.mock(/\/sysPermission\/createApplicationPermission$/, {
  code: 100000,
  message: 'success',
})

Mock.mock(/\/sysPermission\/modifyApplicationPermission$/, {
  code: 100000,
  message: 'success',
})

Mock.mock(/\/sysPermission\/deleteApplicationPermission$/, {
  code: 100000,
  message: 'success',
})
